home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1986 January & February / rerun-1986-01-02.d64 / tax deduction 64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  166 lines

  1. 5 n=0:dima$(200,5),ca$(5),c$(6)
  2. 10 fori=1to5:reada$:ca$(i)=a$:next
  3. 11 fori=1to6:reada$:c$(i)=a$:next
  4. 15 poke53281,15:poke53280,12
  5. 20 print"[147][144]"tab(9)"itemized tax deductions"
  6. 25 print"choose:"
  7. 30 printtab(5)"1.  load data
  8. 35 [153][163]5)"2.  add record
  9. 36 printtab(5)"3.  find a record
  10. 40 [153][163]5)"4.  change record
  11. 45 printtab(5)"5.  delete record
  12. 50 [153][163]5)"6.  display file
  13. 55 printtab(5)"7.  print file
  14. 60 [153][163]5)"8.  save data
  15. 65 printtab(5)"9.  end program
  16. 75 [161]k$:[139]k$[178]""[167]75
  17. 80 k[178][197](k$):[139]k[179]1[176]k[177]9[167]75
  18. 85 [139]k[178]9[167][158]2048:[128]
  19. 90 [145]k[141]100,200,700,300,400,500,600,800
  20. 95 [137]20
  21. 99 [171][171][171][171][171][143] load data-----
  22. 100 [153]"loadload-":f1[178]0:[141]2000
  23. 105 [139]f1[167][159]2,1,0,fl$:[137]135
  24. 110 [159]15,8,15,"io"
  25. 115 [159]2,8,2,"0:"[170]fl$[170]",s,r"
  26. 120 [132]15,e,e$,e1,e2
  27. 125 [153]"disk status:wait"e;e$;e1;e2
  28. 130 [139]e[167][160]2:[160]15:[153]"file not loaded":[141]3000:[142]
  29. 135 [132]2,n
  30. 140 [129]i[178]1[164]n
  31. 145 [129]j[178]1[164]5
  32. 150 [132]2,a$(i,j)
  33. 170 [130]:[130]
  34. 175 [160]2:[139]f1[178]0[167][160]15
  35. 180 [142]
  36. 199 [171][171][171][171][171][143] add data-----
  37. 200 n[178]n[170]1:x[178]n
  38. 210 [153]"load"
  39. 220 [141]4000
  40. 230 [133]"any more entries";i$
  41. 240 [139][200](i$,1)[178]"y"[167]200
  42. 250 [142]
  43. 299 [171][171][171][171][171][143] change record-----
  44. 300 [153]"load":fl[178]0:f[178]3
  45. 310 [133]"check# to be changed";n$
  46. 315 [141]1000:[139]fl[178]1[167][142]
  47. 320 [141]4000:[142]
  48. 399 [171][171][171][171][171][143] delete-----
  49. 400 [153]"load":fl[178]0:f[178]3
  50. 410 [133]"check# to be deleted";n$
  51. 415 [141]1000:[139]fl[178]1[167][142]
  52. 420 n[178]n[171]1
  53. 425 [129]i[178]x[164]n
  54. 430 [129]j[178]1[164]5
  55. 435 a$(i,j)[178]a$(i[170]1,j)
  56. 455 [130]:[130]
  57. 460 [153]"record deleted."
  58. 470 [141]3000:[142]
  59. 499 [171][171][171][171][171][143] view data-----
  60. 500 r[178]0:f[178]0:j[178]0:tl[178]0:[141]5000
  61. 505 [153]"load"
  62. 510 [153]"cat date    ck#   description      amt"
  63. 515 [129]i[178]1[164]39:[153]"usr";:[130]:[153]
  64. 520 [129]i[178]1[164]n
  65. 535 [139]r[178]2[167][139]n$[179][177]a$(i,f)[167]575
  66. 540 j[178]j[170]1
  67. 545 [153]a$(i,1);
  68. 550 [153][163]4)a$(i,2);
  69. 555 [153][163]12)a$(i,3);
  70. 560 [153][163]18)[200](a$(i,4),12);
  71. 561 [153][163]39[171][195](a$(i,5)))a$(i,5)
  72. 565 tl[178]tl[170][197](a$(i,5))
  73. 570 [139]j[173]15[178][181](j[173]15)[167][141]3000:[153]"load"
  74. 575 [130]
  75. 580 [153]"total:wait"tl
  76. 585 [141]3000:[142]
  77. 599 [171][171][171][171][171][143] print data-----
  78. 600 r[178]0:f[178]0:tl[178]0:[141]5000
  79. 605 [159]2,4:[157]2
  80. 607 [153][163]25)"itemized tax deductions":[153]
  81. 608 [139]r[178]2[175]f[178]1[167][153][163]35[171]([195](c$(g)))[173]2);c$(g):[153]
  82. 610 [153][163]5)"cat"[166]5)"date"[166]7)"check#"[166]7)"description"[166]15)"amount"
  83. 615 [153][163]5);:[129]i[178]1[164]64:[153]"usr";:[130]:[153]
  84. 620 [129]i[178]1[164]n
  85. 625 [139]r[178]2[175]n$[179][177]a$(i,f)[167]675
  86. 645 [153][163]5);a$(i,1);[163]5)a$(i,2);
  87. 650 [153][199](16)"25";:[153][163]5[171][195](a$(i,3)))a$(i,3);
  88. 655 [153][199](16)"37"a$(i,4);
  89. 660 [153][199](16)"60";:[153][163]9[171][195](a$(i,5)))a$(i,5)
  90. 665 tl[178]tl[170][197](a$(i,5))
  91. 675 [130]
  92. 680 [153]:[153][163]25)"total:"tl
  93. 685 [152]2:[160]2:[142]
  94. 699 [171][171][171][171][171][143] find a record-----
  95. 700 [141]5070
  96. 710 [141]1000
  97. 720 [142]
  98. 799 [171][171][171][171][171][143] save data-----
  99. 800 [153]"loadsave-":f1[178]0:[141]2000
  100. 805 [139]f1[167][159]2,1,1,fl$:[137]835
  101. 810 [159]15,8,15,"io"
  102. 815 [159]2,8,2,"@0:"[170]fl$[170]",s,w"
  103. 820 [132]15,e,e$,e1,e2
  104. 825 [153]"disk status:wait"e;e$;e1;e2
  105. 830 [139]e[167][160]2:[160]15:[153]"file not saved.":[141]3000:[142]
  106. 835 [152]2,n
  107. 840 [129]i[178]1[164]n
  108. 845 [129]j[178]1[164]5
  109. 850 [152]2,a$(i,j)
  110. 870 [130]:[130]
  111. 875 [160]2:[139]f1[178]0[167][160]15
  112. 880 [142]
  113. 999 [172][172][172][172][172][143] sort records*****
  114. 1000 [129]x[178]1[164]n
  115. 1010 [139]n$[179][177]a$(x,f)[167]1030
  116. 1015 [153]:[129]i[178]1[164]5:[153]a$(x,i):[130]
  117. 1020 [133]"is this the record";i$
  118. 1025 [139][200](i$,1)[178]"y"[167][142]
  119. 1027 [153]"load"
  120. 1030 [130]
  121. 1035 [153]"record not found":[141]3000:fl[178]1:[142]
  122. 1999 [171][171][171][171][171][143] filename input-----
  123. 2000 [133]"filename:wait";fl$
  124. 2010 [133]"dwaitisk or twaitape:";k$
  125. 2020 [139]k$[179][177]"d"[175]k$[179][177]"t"[167]2010
  126. 2030 [139]k$[178]"t"[167]f1[178]1
  127. 2040 [142]
  128. 3000 [153][163]5)"pokepress any key to continue.waitstop"
  129. 3005 [161]k$:[139]k$[178]""[167]3005
  130. 3010 [142]
  131. 4000 [153]:[129]i[178]1[164]6:[153]i;c$(i):[130]
  132. 4001 [133]"category#";c$
  133. 4002 c[178][197](c$):[139]c[179]1[176]c[177]6[167]4001
  134. 4003 a$(x,1)[178][200](c$(c),3)
  135. 4005 [129]i[178]2[164]5
  136. 4010 [153]ca$(i)":";:[133]a$(x,i)
  137. 4020 [130]
  138. 4030 [133]"correct";i$
  139. 4040 [139][200](i$,1)[178]"n"[167]4000
  140. 4050 [142]
  141. 5000 [153]"load"
  142. 5010 [153]"choose:"
  143. 5020 [153][163]5)"1.  all records
  144. 5030 printtab(5)"2.  by field
  145. 5040 [161]r$:[139]r$[178]""[167]5040
  146. 5050 r[178][197](r$):[139]r[179]1[176]r[177]2[167]5000
  147. 5060 [139]r[178]1[167][142]
  148. 5070 [153]"load"
  149. 5080 [153]"choose:"
  150. 5090 [129]i[178]1[164]5
  151. 5100 [153][163]5)i".  "ca$(i):[130]
  152. 5120 [161]f$:[139]f$[178]""[167]5120
  153. 5130 f[178][197](f$):[139]f[179]1[176]f[177]5[167]5070
  154. 5135 [139]f[178]1[167]5155
  155. 5140 [153]"enter "ca$(f);:[133]n$
  156. 5150 [142]
  157. 5155 [153]:[129]i[178]1[164]6:[153]i;c$(i):[130]
  158. 5160 [133]"category#";g$
  159. 5165 g[178][197](g$):[139]g[179]1[176]g[177]6[167]5160
  160. 5170 n$[178][200](c$(g),3)
  161. 5175 [142]
  162. 6000 [131] category, date, check#, description, amount
  163. 6010 [131] medical, taxes, interest, contributions, casualty/theft
  164. 6020 [131] miscellaneous
  165. 9000 [159]15,8,15,"s0:tax ded":[160]15:[148]"@0:tax ded",8
  166.